a=eval(input());
a1=a%10;
a2=(a//10)%10;
a3=a//100;
if a==a1**3+a2**3+a3**3:
   print('True');
else:
   print('False')